package io.github.uicdb.et.capability;

import io.github.uicdb.et.ModElements;

public interface IElementalHandler {
    int drainElemental(int requirement, ModElements type, ElementalAction action);

    boolean hasElemental(ModElements type);

    int fillElemental(int requirement, ModElements type, ElementalAction action);

    int getElementalCapacity(ModElements modElements);

    int getElemental(ModElements modElements);

    void removeElemental(ModElements value);

    void setElemental(ModElements modElements, int value);


    enum ElementalAction {
        EXECUTE,
        SIMULATE;

        private ElementalAction() {
        }

        public boolean execute() {
            return this == EXECUTE;
        }

        public boolean simulate() {
            return this == SIMULATE;
        }
    }
}
